"""
TCP API
@Author: CsCN
"""

import socket
import myConfig
import json
import time


class MyTCPSocket:
    """
    局域网Socket, 需要设置局域网网段
    """
    net: str  # 192.168.180.1/24
    recvFlag = True
    tcpSocket: socket.socket

    def __init__(self, net: str, destIP, destPort):
        self.tcpSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.net = net
        self.myip = net.split('/')[0]
